using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;

namespace newsApi.Models;

public class News
{
    [BsonId]
    [BsonRepresentation(BsonType.ObjectId)]
    public string? Id { get; set; }

    [BsonElement("channel")]
    public string Channel { get; set; }=null!;
    
    [BsonElement("num")]
    public string Num { get; set; }=null!;

     [BsonElement("title")]
    public string Title { get; set; } = null!;

    [BsonElement("time")]
    public string Time { get; set; }=null!;
    [BsonElement("src")]
    public string Src { get; set; }=null!;
    [BsonElement("category")]
    public string Category { get; set; }=null!;
     [BsonElement("pic")]
    public string Pic { get; set; }=null!;
     [BsonElement("content")]
    public string Content { get; set; }=null!;
     [BsonElement("url")]
    public string Url{ get; set; }=null!;
     [BsonElement("weburl")]
    public string Weburl { get; set; }=null!;
}